package com.jackstraw.jack_base.datasource.jpa.service.impl;

import com.jackstraw.jack_base.datasource.common.aspect.annotation.DataSourceNameCut;
import com.jackstraw.jack_base.datasource.common.entity.enums.DataSourceTypeEnum;
import com.jackstraw.jack_base.datasource.jpa.base.service.impl.JpaServiceImpl;
import com.jackstraw.jack_base.datasource.jpa.dao.database.User2Dao;
import com.jackstraw.jack_base.datasource.jpa.entity.bo.User2Bo;
import com.jackstraw.jack_base.datasource.jpa.entity.po.User2Po;
import com.jackstraw.jack_base.datasource.jpa.service.User2Service;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@DataSourceNameCut(dataSourceTypeEnum = DataSourceTypeEnum.database, dataSourceName = "dataBaseName1")
public class User2ServiceImpl extends JpaServiceImpl<User2Dao, User2Po, User2Bo, Long> implements User2Service {

    @Override
    public void aaa() {

        User2Bo user2Bo = new User2Bo();

        user2Bo.setEmail("jack@qq.com");
        user2Bo.setAge(11);
        user2Bo.setName("jack");

        this.insert(user2Bo);
        log.info("{}", user2Bo);

    }
}
